<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="resource/js/vue.js"></script>
    <style>
        div{
            width: 300px;
            height: 300px;;
        }
        .red{
            background: red;
        }
        .blue{
            background: blue;
        }
    </style>
</head>
<body>
<div id="demo" v-bind:class="{'red': isRed, 'blue': isBlue}"></div>
<script>
    var vm = new Vue({
        el: '#demo',
        data: {
            isRed: true,
            isBlue: false
        }
    })
</script>
</body>
</html>